package com.service.device;

import com.common.ErrorCodeEnum;
import com.common.emums.DataStatus;
import com.common.exception.BusinessException;
import com.common.utils.StringUtils;
import com.core.springSecurity.common.SecurityUtils;

import com.dao.secondary.device.DevicePcbExFactorySimPoolInfoMapper;
import com.model.domain.device.GetDevicePcbExFactorySimPoolInfoDO;
import com.model.pojo.device.DevicePcbExFactorySimPoolInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;



/**
 * @Author: zql
 * @Description: 安卓版出厂SIM卡号池信息服务
 * @Data: 2024-03-11
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class DevicePcbExFactorySimPoolInfoService {
    private final DevicePcbExFactorySimPoolInfoMapper devicePcbExFactorySimPoolInfoMapper;
    public List<DevicePcbExFactorySimPoolInfo> getPageList(GetDevicePcbExFactorySimPoolInfoDO getDevicePcbExFactorySimPoolInfoDO){
        PageHelper.clearPage();
        PageHelper.startPage(getDevicePcbExFactorySimPoolInfoDO.getPage(),getDevicePcbExFactorySimPoolInfoDO.getPageSize(),getDevicePcbExFactorySimPoolInfoDO.getSortRow()+getDevicePcbExFactorySimPoolInfoDO.getSortOrder());
        return devicePcbExFactorySimPoolInfoMapper.selectList(getDevicePcbExFactorySimPoolInfoDO);
    }
    public List<DevicePcbExFactorySimPoolInfo> getAllList(GetDevicePcbExFactorySimPoolInfoDO getDevicePcbExFactorySimPoolInfoDO){
        PageHelper.clearPage();
        return devicePcbExFactorySimPoolInfoMapper.selectList(getDevicePcbExFactorySimPoolInfoDO);
    }

    public DevicePcbExFactorySimPoolInfo getBySim(String sim){
        return devicePcbExFactorySimPoolInfoMapper.selectBySim(sim);
    }
    public void saveList(List<DevicePcbExFactorySimPoolInfo> list){
        devicePcbExFactorySimPoolInfoMapper.insertListSelective(list);
    }
    public void updateList(List<DevicePcbExFactorySimPoolInfo> list){
        devicePcbExFactorySimPoolInfoMapper.updateListSelective(list);
    }
}
